<template>
    
    <div class="demo-pagination-block">
      <el-pagination
        class="main"
        v-model:current-page="currentPage4"
        v-model:page-size="pageSize4"
        :page-sizes="[100, 200, 300, 400]"
        :small="small"
        :disabled="disabled"
        :background="background"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
      <div class="whitespace"></div>
    </div>
  </template>
  <script lang="ts" setup>
  import { ref } from 'vue'

  const currentPage4 = ref(4)

  const pageSize4 = ref(100)
  const small = ref(false)
  const background = ref(false)
  const disabled = ref(false)
  
  const handleSizeChange = (val: number) => {
    console.log(`${val} items per page`)
  }
  const handleCurrentChange = (val: number) => {
    console.log(`current page: ${val}`)
  }
  </script>
  
  <style scoped>
  .demo-pagination-block + .demo-pagination-block {
    margin-top: 10px;
    
  }
  .demo-pagination-block .demonstration {
    margin-bottom: 16px;
  }
  .demo-pagination-block{
    position: relative;
    top: 131px;
    background-color: white;
  }
  .main{
    position: relative;
    width: fit-content;
    transform: translateX(-50%);
    left: 50%;
  }
  .whitespace{
    width: 100%;
    height: 0.5rem;
}
  </style>
  